package com.linzelin.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class ProductController {

    @Secured("ROLE_USER")
    @RequestMapping("/paper")
    @ResponseBody
    public String paper() {
        return "应该可以访问的小伙子";
    }

    @Secured("ROLE_SUPER")
    @RequestMapping("/getData")
    @ResponseBody
    public String findData() {
        return "成功查询到数据";
    }

}
